package net.openl10n.packaging;

import net.openl10n.opc4j.PackagePart;

public class CoreFilePropertiesPart extends OpenLocPart implements IFixedContentTypePart{

	public static final String CONTENT_TYPE = "application/vnd.openxmlformats-package.core-properties+xml";
	public static final String TARGET_NAME = "/docProps/core.xml";
	public static final String RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties";
	
	public static final OpenLocPartFactory<CoreFilePropertiesPart> FACTORY = 
		new OpenLocPartFactory<CoreFilePropertiesPart>() {
			@Override
			public CoreFilePropertiesPart create(OpenLocPartContainer container, PackagePart part, OpenLocPartFactoryManager partFactoryManager) {
				return new CoreFilePropertiesPart(container, part, partFactoryManager);
			}

			@Override
			public String getContentType() {
				return CONTENT_TYPE;
			}

			@Override
			public String getRelationshipType() {
				return RELATIONSHIP_TYPE;
			}

			@Override
			public Class<CoreFilePropertiesPart> getTargetClass(){
				return CoreFilePropertiesPart.class;
			}
			
			@Override
			protected String getPartNamePattern() {
				return TARGET_NAME;
			};
		};
	
	protected CoreFilePropertiesPart(OpenLocPartContainer container, PackagePart part, OpenLocPartFactoryManager partFactoryManager){
		super(container, part, partFactoryManager); 
	}
	
}
